package file.untils;

import java.awt.*;

/**
 * 文件位置大小处理
 * @Author: zou
 * @email: 704572528@qq.com
 * @Date: 2020/10/27 14:19
 */
public class FilePositionUntils {

    /**
     * 获取环境的居中位置
     * @return
     */
    public static Dimension getCenter() {
        Dimension dimension = Toolkit.getDefaultToolkit().getScreenSize();
        double width = dimension.getWidth() / 2;
        double height = dimension.getHeight() / 2;
        dimension.setSize(width, height);
        return dimension;
    }

}
